import Vue from 'vue'
import Router from 'vue-router'

const Community = () => import('../views/community');

const Home = () => import('../views/community/e-home');

const Post = () => import('../views/community/e-post');

Vue.use(Router);

let base = `${process.env.BASE_URL}` // 动态获取二级目录

export default new Router({
    base: base,
    routes: [
        {
            path: '/',
            name: 'community',
            component: Community,
            redirect: '/Home',
            children: [
                {path: '/home', component: Home},
                {path: '/post', component: Post}
            ]
        },


    ]
})
